﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DoodJetView
{
    /// <summary>
    /// Logique d'interaction pour HomeLogin.xaml
    /// </summary>
    public partial class HomeLogin : Window
    {
        private Run run;

       
        public HomeLogin(Run run)
        {
            // TODO: Complete member initialization
            InitializeComponent();
            this.run = run;
        }

        /// <summary>
        /// Objectif de quitter l'application
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            //Verifié les noms d'utilisateur
            this.run.MainWidow.Show();
            this.run.Homelogin.Hide();
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Application.Current.Shutdown();
        }
    }
}
